package com.warm.utils;

import java.util.Random;

/**
 * Created by liangchuang on 2018/9/4.
 */
public class KeyUtil {

    //生成唯一主键：时间+随机数
    public static synchronized String genUniqueKey(){
       Random random = new Random();

       System.currentTimeMillis();

       Integer number = random.nextInt(900000) + 10000;

       return System.currentTimeMillis() + String.valueOf(number);
    }
}
